# $Id: PKGBUILD 151302 2012-02-25 13:19:54Z pierre $
# Maintainer: kevin <kevin@wmpub.ca>
# Contributor: Wael Nasreddine <gandalf@siemens-mobiles.org>

pkgname=perl-passwd-md5
_realname=Crypt-PasswdMD5
pkgver=1.3
pkgrel=5
pkgdesc="Provides a crypt()-compatible interface to new MD5-based crypt()"
arch=(any)
license=('GPL' 'PerlArtistic')
url="http://search.cpan.org/dist/${_realname}/"
depends=('perl')
options=('!emptydirs')
source=("http://search.cpan.org/CPAN/authors/id/L/LU/LUISMUNOZ/${_realname}-$pkgver.tar.gz")
md5sums=('368205b1be8c0d4f807afe25d6fbd1ad')

build() {
  cd $srcdir/${_realname}-$pkgver
  # install module in vendor directories.
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd $srcdir/${_realname}-$pkgver
  make test
}

package() {
  cd $srcdir/${_realname}-$pkgver
  make install DESTDIR=${pkgdir}

  # remove perllocal.pod and .packlist
  find ${pkgdir} -name perllocal.pod -delete
  find ${pkgdir} -name .packlist -delete
}
